/* GNU Mailutils -- a suite of utilities for electronic mail
   Copyright (C) 1999, 2000, 2001, 2005, 2007 Free Software Foundation, Inc.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 3 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General
   Public License along with this library; if not, write to the
   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301 USA */


#ifndef INVARIANT_COLLECTOR_H
#define INVARIANT_COLLECTOR_H

#include <iostream>
#include <set>
#include <algorithm>
#include "constants.h"
#include "silhouette.h"

/**
 * \file invariants_collector.h
 * \author Ice and Magic
 * \date 21 Avril 2011
 * \brief Contient la définition de la classe i_collector
 */


class i_collector;		// cyclic dependance

std::ostream&	operator<<(std::ostream& , const i_collector&);

/**
 *  \brief Cette classe fait la collecte des points fixes d'une intervale donnée
 */
class	i_collector{
public:
	//!	\brief	borne inférieure
	__type	m_lb;
		//! \brief borne supérieure
	__type m_ub;
	//! \brief l'ensemble des points fixes
	std::set<__type>	invariants;

	//! \brief constructeur et initialiseur de l'espace de recherche
	i_collector(__type lb= 1, __type  ub =0xffffffffffffffff):
		m_lb(lb), m_ub(ub) {/*nothing else*/};
	~i_collector(){/*do nothing*/}

	//! \brief	lancer la recherche
void	collect();
	//! \brief affichage des points fixes trouvés sur la sortie standard.
void	print(){
		std::cout<<*this;
		}

};

#endif
